package exception;

/**
 * 异常的抛出
 */
public class ThrowDemo {
    public static void main(String[] args) {
        Person person = new Person();

        try {
            person.setAge(1000);
        } catch (IllegalAgeException e) {
            throw new RuntimeException(e);
        }
        System.out.println("此人年龄：" + person.getAge()+"岁");
    }
}
